import requests
import json
import datetime
import time

url = 'http://www.whggzy.com/portal/category'
headers = {
    "Accept": "*/*",
    "Content-Type": "application/json",
    "X-Requested-With": "XMLHttpRequest",
}
timestamp = int(time.time() * 1000)
data = '{"pageNo":1,"pageSize":15,"categoryCode":"GovernmentProcurement","_t":{timestamp}}'
response = requests.post(url, headers=headers, data=data)
print(response.text)
data = json.loads(response.text)['result']['data']['data']
for row in data:
    title = row['title']
    timestamp = row['publishDate'] // 1000
    dt = datetime.datetime.fromtimestamp(timestamp)
    day = str(dt.year) + '-' + str(dt.month) + '-' + str(dt.day)
    print(title, day)
